package com.tfswue.qmp.listener;

import com.tfswue.qmp.entity.UserRegisteredEvent;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.ApplicationListener;
import org.springframework.stereotype.Component;



@Component
public class UserEventListener implements ApplicationListener<UserRegisteredEvent>{

    private static final Logger logger = LoggerFactory.getLogger(UserEventListener.class);

    @Override
    public void onApplicationEvent(UserRegisteredEvent event) {
    logger.info("记录用户注册日志:{} | {}",
            event.getUsername(),event.getEmail());
    }
}
